<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>TODO supply a title</title>
    </h:head>
    <body> <f:view>
        <h:form>

            <p:dataTable var="item" value="#{adminBean.listAdmin}"
                         paginator="true" rows="3"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15">
                <f:facet name="header">
                   List Admin
                </f:facet>

                <p:column sortBy="#{item.userName}" filterBy="#{item.userName}">
                    <f:facet name="header">
                        <h:outputText value="User Name" />
                    </f:facet>
                    <h:outputText value="#{item.userName}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="address" />
                    </f:facet>
                    <h:outputText value="#{item.address}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="fullName" />
                    </f:facet>
                    <h:outputText value="#{item.fullName}" />
                </p:column>

                <c:if test="${(sessionScope.username)==(arr.username)}">
                                  <td class="action" width="85" align="right"><a href="DeleteCommentServlet?CommentId=<c:out value="${arrComment.commentid}"/>" class="view">Delete</a></td>
                                </c:if>
            </p:dataTable>

        </h:form>
        </f:view>
    </body>
</html>
